<span page-title ng-model="contentCredential">{{ 'Products for ' | translate }} {{ contentCredential.name }}</span>

<div data-extend-template="layouts/partials/table.html">
  <span data-block="no-rows-message" translate>
    You currently don't have any Repositories associated with this Content Credential.
  </span>

  <div data-block="search">
    <input type="text" class="form-control" stop-event="click"
            placeholder="{{ 'Filter...' | translate }}"
            ng-model="contentCredentialRepositoryFilter"/>
  </div>

  <div data-block="table">
      <table class="table table-striped table-bordered">
      <thead>
        <tr>
          <th translate>Name</th>
          <th translate>Product</th>
          <th translate>Type</th>
          <th translate>Used as</th>
        </tr>
      </thead>

      <tbody>
        <tr ng-repeat="repository in table.rows | filter:contentCredentialRepositoryFilter">
          <td>
            <a ui-sref="product.repository.info({productId: repository.product.id, repositoryId: repository.library_instance_id})">{{ repository.name }}</a>
          </td>
          <td>
            <a ui-sref="product.repositories({productId: repository.product.id})">
              {{ repository.product.name }}
            </a>
          </td>
          <td>{{ repository.content_type }}</td>
          <td>{{ repository.usedAs }}</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
